from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
d=webdriver.Firefox()
d.get('https://www.baidu.com/')
map=d.find_element(By.LINK_TEXT,'地图')
map.click()
d.back()
sleep(2)
news=d.find_element_by_link_text('新闻')
news.click()
sleep(2)
d.back()
sleep(2)
d.quit()
